using Unity.Entities;
using Unity.Mathematics;
using UnityEngine;

namespace DOTS.DOD.LESSON5
{
    struct RandomTarget : IComponentData
    {
        public float3 TargetPos;
    }

    public class RandomTargetAuthoring : MonoBehaviour
    {
        class Baker : Baker<RandomTargetAuthoring>
        {
            public override void Bake(RandomTargetAuthoring authoring)
            {
                var entity = GetEntity(TransformUsageFlags.None);
                AddComponent(entity, new RandomTarget()
                {
                    TargetPos = float3.zero,
                });
            }
        }
    }
}